package com.jianzhile.jobs.activities.person;

import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jianzhile.jobs.R;

import butterknife.Bind;
import butterknife.ButterKnife;

public class ChooseJobActivity extends AppCompatActivity {

    @Bind(R.id.content_choose_job_recycler)
    RecyclerView recyclerView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_coose_job);

        ButterKnife.bind(this);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        final ActionBar ab = getSupportActionBar();
        ab.setElevation(0);
        ab.setDisplayHomeAsUpEnabled(true);
        ab.setDefaultDisplayHomeAsUpEnabled(true);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ChooseJobActivity.this.finish();
            }
        });
        ab.setTitle("");
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(new MyRecyclerViewAdapter());
    }



    public class MyRecyclerViewAdapter extends RecyclerView.Adapter<MyRecyclerViewAdapter.ItemViewHolder> {


        @Override
        public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

            View view = LayoutInflater.from(parent.getContext())
                    .inflate(R.layout.choose_job_type_item, parent, false);
            return new ItemViewHolder(view);

        }

        @Override
        public void onBindViewHolder(MyRecyclerViewAdapter.ItemViewHolder holder, int position) {

        }

        @Override
        public int getItemCount() {
            return 10;
        }




        public class ItemViewHolder extends RecyclerView.ViewHolder {

            public final View mView;

            public ItemViewHolder(View itemView) {
                super(itemView);
                mView = itemView;
               // ButterKnife.bind(this, itemView);

            }
        }

    }
}
